rockchip/rk3399: Add watchdog support in pmusram
authorDerek Basehore <dbasehore@chromium.org>
Mon, 23 Apr 2018 21:49:22 +0000 (14:49 -0700)
committerLin Huang <hl@rock-chips.com>
Tue, 15 May 2018 08:31:19 +0000 (16:31 +0800)
commit5b886432dce06ad2bbc42150eab779a6e0cd8727
treeb9146d34035427fb95b6fe13c78ed2a747d65a84
parentff4735cfdfde273866a7e079dedec27b1e11438e
rockchip/rk3399: Add watchdog support in pmusram

To catch early hangs in resume, this sets up the watchdog before
anything else in the pmusram code (ignoring setting up the stack...).
This uses hard coded settings for the watchdog until the proper
watchdog restore later on in the firmware/kernel.

This also restores the old watchdog register values before the PLLs
are restored to make sure we don't temporarily switch over to a 1/3s
timeout on the watchdog when the pclk_wdt goes from 4MHz to 100MHz.

Change-Id: I8f7652089a88783271b17482117b4609330abe80
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
plat/rockchip/rk3399/drivers/dram/suspend.c
plat/rockchip/rk3399/drivers/pmu/pmu.c
plat/rockchip/rk3399/drivers/secure/secure.c
plat/rockchip/rk3399/drivers/secure/secure.h
plat/rockchip/rk3399/drivers/soc/soc.c
plat/rockchip/rk3399/drivers/soc/soc.h